Skip to content

Add active launch indicator to launch history menu#2652

Open
SougandhS wants to merge 1 commit intoeclipse-platform:masterfrom
SougandhS:LaunchActive
Open

Add active launch indicator to launch history menu#2652
SougandhS wants to merge 1 commit intoeclipse-platform:masterfrom
SougandhS:LaunchActive

Conversation

@SougandhS
Copy link
Copy Markdown
Contributor

@SougandhS SougandhS commented May 5, 2026

Adds support to show an active launch indicator in the launch history menu, helping users quickly identify which launch configurations are currently running from launch history. Entries with associated non-terminated launches are marked with a visual indicator "●" ,Once the indicator is shown, users can immediately recognize that the configuration is already running, helping avoid unnecessary or unintended clicks from the launch history menu. The feature is controlled by the preference


Screenshot 2026-05-05 at 6 01 17 PM and is applied only when enabled, ensuring no change to existing behavior by default.

With Active (Running)
image
image


With In-Active (Terminated or not launched) image

@iloveeclipse
Copy link
Copy Markdown
Member

Since recently the "circle" was added to indicate changed file, I would not use this for running launch config, it would be confusing.

What about simple "(running)" label?

@SougandhS
Copy link
Copy Markdown
Contributor Author

What about simple "(running)" label?

I went with this first, but It felt bit long...

image

@SougandhS
Copy link
Copy Markdown
Contributor Author

Since recently the "circle" was added to indicate changed file, I would not use this for running launch config, it would be confusing.

How about \u25B8 ?

image

@iloveeclipse
Copy link
Copy Markdown
Member

iloveeclipse commented May 5, 2026

How about \u25B8 ?

How about \u2699 ( ⚙ "gear" ) or \u1F3C3 ( 🏃 "running man" ) ?

@SougandhS
Copy link
Copy Markdown
Contributor Author

How about \u2699 ( ⚙ "gear" ) or \u1F3C3 ( 🏃 "running man" ) ?

Gear looks great !
image
Pushed this change

\u1F3C3 ( 🏃 "running man" )

this doesn't render 😅

@iloveeclipse
Copy link
Copy Markdown
Member

The change is simple and nice, do we really need an option for that? If yes, please enable by default.

ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
boolean launchPref = store.getBoolean(IInternalDebugUIConstants.PREF_LAUNCHED_INDICATOR);
for (ILaunchConfiguration launch : favoriteList) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please guard the new code, including fetching of the launch configs by first check if launchPref is set? Same below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a length check for launches

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is not needed, the checkIfLaunched() will not do much if it is empty, same below

@akurtakov
Copy link
Copy Markdown
Member

If unicode symbol is to be used - extra testing is needed that the chosen one is widely available in default fonts as per (https://eclipse.dev/eclipse/development/plans/eclipse_project_plan_4_40.xml#target_environments) and ideally in some popular fonts(whatever they are) and last but not least verify on all platform that nothing bad happens when a font that doesn't contain the symbol is used.

@akurtakov
Copy link
Copy Markdown
Member

The change is simple and nice, do we really need an option for that? If yes, please enable by default.

Please no option for such things. We already have more options than one can find and manage.

@SougandhS SougandhS force-pushed the LaunchActive branch 2 times, most recently from 18c45c7 to e2949db Compare May 5, 2026 14:16
@SougandhS
Copy link
Copy Markdown
Contributor Author

The change is simple and nice, do we really need an option for that? If yes, please enable by default.

Please no option for such things. We already have more options than one can find and manage.

Removed all the preference parts 👍

@SougandhS
Copy link
Copy Markdown
Contributor Author

If unicode symbol is to be used - extra testing is needed that the chosen one is widely available in default fonts as per (https://eclipse.dev/eclipse/development/plans/eclipse_project_plan_4_40.xml#target_environments) and ideally in some popular fonts(whatever they are) and last but not least verify on all platform that nothing bad happens when a font that doesn't contain the symbol is used.

Thanks, I'll try to check in these platforms..

@iloveeclipse
Copy link
Copy Markdown
Member

If unicode symbol is to be used - extra testing is needed that the chosen one is widely available in default fonts

See also https://stackoverflow.com/questions/48468088/unicode-character-uncompatibility

At least on RHEL 9.6 with "Sans Serif" dialog font (whatever system means with that name) it looks OK.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Test Results

    54 files  ±0      54 suites  ±0   37m 54s ⏱️ + 1m 48s
 4 665 tests ±0   4 643 ✅ ±0   22 💤 ±0  0 ❌ ±0 
12 435 runs  ±0  12 279 ✅ ±0  156 💤 ±0  0 ❌ ±0 

Results for commit a752103. ± Comparison against base commit b1b8226.

♻️ This comment has been updated with latest results.

@SougandhS
Copy link
Copy Markdown
Contributor Author

Hi @iloveeclipse, @akurtakov, how about adding overlay image ?
image image

@iloveeclipse
Copy link
Copy Markdown
Member

how about adding overlay image ?

Why not, but then maybe the one with the green "Run" arrow like on the Progress view icon?

@akurtakov
Copy link
Copy Markdown
Member

I have a preference to (widely spread) unicode symbol as (at least on Linux) these autoadjust contrast on changes of Gtk theme. Also they are less resource hungry and auto managed by OS instead of images that have to be destroyed and etc.

@iloveeclipse
Copy link
Copy Markdown
Member

So let's try with \u2699 ( ⚙ "gear" ) and push it to M3 so hopefully more people could test it. If someone complains, we can switch it off for RC.

@SougandhS
Copy link
Copy Markdown
Contributor Author

So let's try with \u2699 ( ⚙ "gear" ) and push it to M3 so hopefully more people could test it. If someone complains, we can switch it off for RC.

So include a preference option ?

@iloveeclipse
Copy link
Copy Markdown
Member

no, just merge & check for bug reports. worst case is some rectangle shown instead I assume.

Adds a visual indicator to launch configurations that are currently
active in the launch history menu.
*/
private boolean checkIfLaunched(ILaunchConfiguration launchConfiguration, ILaunch[] launches) {
for (ILaunch launch : launches) {
if (launch.getLaunchConfiguration().equals(launchConfiguration) && !launch.isTerminated()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

launch.getLaunchConfiguration() can be null

for (ILaunchConfiguration launch : historyList) {
LaunchAction action= new LaunchAction(launch, getMode());
if (launches.length > 0 && checkIfLaunched(launch, launches)) {
action.setText(action.getText() + " \u2699"); //$NON-NLS-1$
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are two spaces between text and new character intended?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes two spaces are required. else it wont look good

ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
boolean launchPref = store.getBoolean(IInternalDebugUIConstants.PREF_LAUNCHED_INDICATOR);
for (ILaunchConfiguration launch : favoriteList) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is not needed, the checkIfLaunched() will not do much if it is empty, same below

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds UI decoration to the launch history (favorites + history) drop-down menu so that entries corresponding to a currently active (non-terminated) launch are visually marked, helping users avoid relaunching already-running configurations.

Changes:

  • Fetches current launches from the launch manager when building the launch history menu.
  • Decorates matching launch history/favorite entries by appending a Unicode indicator.
  • Introduces a helper method to detect whether a configuration has an associated non-terminated launch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

*/
private boolean checkIfLaunched(ILaunchConfiguration launchConfiguration, ILaunch[] launches) {
for (ILaunch launch : launches) {
if (launch.getLaunchConfiguration().equals(launchConfiguration) && !launch.isTerminated()) {
Comment on lines +351 to +371
ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
for (ILaunchConfiguration launch : favoriteList) {
LaunchAction action= new LaunchAction(launch, getMode());
if (launches.length > 0 && checkIfLaunched(launch, launches)) {
action.setText(action.getText() + " \u2699"); //$NON-NLS-1$
}
addToMenu(menu, action, accelerator);
accelerator++;
}

// Separator between favorites and history
if (favoriteList.length > 0 && historyList.length > 0) {
addSeparator(menu);
}

// Add history launches next
for (ILaunchConfiguration launch : historyList) {
LaunchAction action= new LaunchAction(launch, getMode());
if (launches.length > 0 && checkIfLaunched(launch, launches)) {
action.setText(action.getText() + " \u2699"); //$NON-NLS-1$
}
Comment on lines +384 to +397
/**
* Returns whether the given launch configuration has been launched.
*
* @param launchConfiguration the launch configuration
* @param launches the current active launches
* @return {@code true} if a matching launch exists, {@code false} otherwise
*/
private boolean checkIfLaunched(ILaunchConfiguration launchConfiguration, ILaunch[] launches) {
for (ILaunch launch : launches) {
if (launch.getLaunchConfiguration().equals(launchConfiguration) && !launch.isTerminated()) {
return true;
}
}
return false;
Comment on lines 345 to 374
protected void fillMenu(Menu menu) {
ILaunchConfiguration[] historyList= getHistory();
ILaunchConfiguration[] favoriteList = getFavorites();

// Add favorites
int accelerator = 1;
ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
for (ILaunchConfiguration launch : favoriteList) {
LaunchAction action= new LaunchAction(launch, getMode());
if (launches.length > 0 && checkIfLaunched(launch, launches)) {
action.setText(action.getText() + " \u2699"); //$NON-NLS-1$
}
addToMenu(menu, action, accelerator);
accelerator++;
}

// Separator between favorites and history
if (favoriteList.length > 0 && historyList.length > 0) {
addSeparator(menu);
}

// Add history launches next
for (ILaunchConfiguration launch : historyList) {
LaunchAction action= new LaunchAction(launch, getMode());
if (launches.length > 0 && checkIfLaunched(launch, launches)) {
action.setText(action.getText() + " \u2699"); //$NON-NLS-1$
}
addToMenu(menu, action, accelerator);
accelerator++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants